#include<bits/stdc++.h>

using namespace std;
const int maxn = 1000 + 10;

template<typename T>
struct Stack {//struct vs class

    T S[maxn];
    int top = -1;


    int size() {
        return top + 1;
    }

    void init() {
        top = -1;
    }

    void push(T x) {
        S[++top] = x;
    }

    void pop() {
        --top;
    }

    T peek() {
        return S[top];
    }

};

//using namespace zj;
int main() {
    Stack<int> s;
    for (int i = 0; i < 10; i++)s.push(i);
    while (s.size()) {
        cout << s.peek();
        s.pop();
    }
    return 0;
}